/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package simplemetrosystem.view.action;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import simplemetrosystem.view.MetroFrame;
import simplemetrosystem.view.canvas.CanvasModel;

/**
 *
 * @author Eric Qian
 */
public class NewEdgeActionListener implements ActionListener {

    /**
     * 
     * @param frame
     */
    public NewEdgeActionListener(MetroFrame frame) {
        this.frame = frame;
    }

    public void actionPerformed(ActionEvent e) {
        frame.getMetroTabbedPane().getAllLineCanvas().setNewEdgeMouseHandler();
        frame.getEditToolBar().getNewEdgeButton().setSelected(true);
        CanvasModel.getInstance().cancelSelect();
    }
    private MetroFrame frame;
}

